/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DAO.*;
import DTO.*;
import java.awt.Color;
import java.util.List;

import java.util.List;
import java.util.ArrayList;
import java.util.Date;
import java.util.regex.*;

import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;





import java.awt.event.*;

import java.sql.*;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.swing.JRViewer;

/**
 *
 * @author Luis Olave 10
 */
public class ModificacionGarantiaHipotecaria extends javax.swing.JFrame {

    garantiasDAO reg = new garantiasDAO();
    garantiaHipotecariaDTO garantia = new garantiaHipotecariaDTO();
    usuarioDTO user;

    /**
     * Creates new form ModificacionGarantiaHipotecaria
     */
    public ModificacionGarantiaHipotecaria(usuarioDTO user) {
        
        initComponents();
        this.user = user;
        cargarItemsComboBoxSucursal();
        cargarItemsComboBoxCobertura();
        cargarItemsComboBoxMoneda();
        cargarItemsComboBoxTipoConstruccion();
        cargarItemsComboBoxComuna();
        cargarItemsComboBoxEstadoContribucion();
        cargarItemsComboBoxLocalidadRegistro();
        cargarItemsComboBoxTipoGarantia();
        cargarItemsComboBoxGradoPreferencia();
        chkBuscarFolio.setSelected(true);
        pnlBuscarRol.setVisible(false);
        this.btnActualizar.setVisible(false);
        this.txtRolSii.setEditable(false);
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    }

    
    private void cargarItemsComboBoxSucursal() {
        List<sucursalDTO> ListaSucursal = CCSucursal.listarItemSucursal();
        if (ListaSucursal != null) {
            int size = ListaSucursal.size();
            for (int i = 0; i < size; i++) {
                this.cmbSucursal.addItem(ListaSucursal.get(i));
            }
        }
    }

    private void cargarItemsComboBoxCobertura() {
        List<coberturaDTO> ListaCobertura = CCCobertura.listarItemCobertura();
        if (ListaCobertura != null) {
            int size = ListaCobertura.size();
            for (int i = 0; i < size; i++) {
                this.cmbCobertura.addItem(ListaCobertura.get(i));
            }
        }
    }

    private void cargarItemsComboBoxMoneda() {
        List<monedaDTO> ListaMoneda = CCMoneda.listarItemMoneda();
        if (ListaMoneda != null) {
            int size = ListaMoneda.size();
            for (int i = 0; i < size; i++) {
                this.cmbMoneda.addItem(ListaMoneda.get(i));
            }
        }
    }

    private void cargarItemsComboBoxTipoConstruccion() {
        List<tipoConstruccionDTO> ListaTipoConstru = CCTipoConstruccion.listarItemConstruccion();
        if (ListaTipoConstru != null) {
            int size = ListaTipoConstru.size();
            for (int i = 0; i < size; i++) {
                this.cmbTipoConstru.addItem(ListaTipoConstru.get(i));
            }
        }
    }

    private void cargarItemsComboBoxComuna() {
        List<comunaDTO> ListaComuna = CCComuna.listarItemComuna();
        if (ListaComuna != null) {
            int size = ListaComuna.size();
            for (int i = 0; i < size; i++) {
                this.cmbComuna.addItem(ListaComuna.get(i));
            }
        }
    }

    private void cargarItemsComboBoxEstadoContribucion() {
        List<estadoContribucionDTO> ListaEstadoContri = CCEstadoContribucion.listarItemEstadoContribucion();
        if (ListaEstadoContri != null) {
            int size = ListaEstadoContri.size();
            for (int i = 0; i < size; i++) {
                this.cmbEstadoContri.addItem(ListaEstadoContri.get(i));
            }
        }
    }

    private void cargarItemsComboBoxLocalidadRegistro() {
        List<localidadRegistroDTO> ListaLocalidadReg = CCLocalidadRegistro.listarItemLocalidadRegistro();
        if (ListaLocalidadReg != null) {
            int size = ListaLocalidadReg.size();
            for (int i = 0; i < size; i++) {
                this.cmbLocaReg.addItem(ListaLocalidadReg.get(i));
            }
        }
    }

    private void cargarItemsComboBoxTipoGarantia() {
        List<tipoGarantiaDTO> ListaTipoGtia = CCTipoGarantia.listarItemTipoGarantia();
        if (ListaTipoGtia != null) {
            int size = ListaTipoGtia.size();
            for (int i = 0; i < size; i++) {
                this.cmbTipoGtia.addItem(ListaTipoGtia.get(i));
            }
        }
    }

    private void cargarItemsComboBoxGradoPreferencia() {
        List<gradoProferenciaDTO> ListaGradoPrefere = CCGradoPreferencia.listarItemGradoPreferencia();
        if (ListaGradoPrefere != null) {
            int size = ListaGradoPrefere.size();
            for (int i = 0; i < size; i++) {
                this.cmbGradoPreferencia.addItem(ListaGradoPrefere.get(i));
            }
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        btnMenuPrincipal = new javax.swing.JButton();
        pnlDatosPersoGara = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        txtNombre = new javax.swing.JTextField();
        txtApellMaterno = new javax.swing.JTextField();
        txtApellPaterno = new javax.swing.JTextField();
        txtRut = new javax.swing.JTextField();
        pnlBuscarFolio = new javax.swing.JPanel();
        jLabel31 = new javax.swing.JLabel();
        txtBuscarPorFolio = new javax.swing.JTextField();
        btnBuscarFolio = new javax.swing.JButton();
        pnlBuscarRol = new javax.swing.JPanel();
        jLabel30 = new javax.swing.JLabel();
        txtBuscarPorSii = new javax.swing.JTextField();
        btnBuscarSii = new javax.swing.JButton();
        chkBuscarRol = new javax.swing.JCheckBox();
        chkBuscarFolio = new javax.swing.JCheckBox();
        jPanel2 = new javax.swing.JPanel();
        pnlDescripGarantia = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        txtOtroComentario = new javax.swing.JTextArea();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtDescripcion = new javax.swing.JTextArea();
        lblDescripcion = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        pnlCreacionGaraHipo = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jPanel4 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        cmbGradoPreferencia = new javax.swing.JComboBox();
        cmbTipoGtia = new javax.swing.JComboBox();
        txtFojas = new javax.swing.JTextField();
        txtAñosRepertorio = new javax.swing.JTextField();
        txtMtsConstruidos = new javax.swing.JTextField();
        jcFechExtincion = new com.toedter.calendar.JDateChooser();
        jcFechUltRevaluo = new com.toedter.calendar.JDateChooser();
        jcFechUltCredito = new com.toedter.calendar.JDateChooser();
        jPanel10 = new javax.swing.JPanel();
        jLabel46 = new javax.swing.JLabel();
        txtSubirArchivo = new javax.swing.JTextField();
        btnExaminar = new javax.swing.JButton();
        txtAdjuntar = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        txtDireccion = new javax.swing.JTextField();
        cmbSucursal = new javax.swing.JComboBox();
        cmbCobertura = new javax.swing.JComboBox();
        txtSuperficie = new javax.swing.JTextField();
        txtRegistroCbr = new javax.swing.JTextField();
        txtRolSii = new javax.swing.JTextField();
        txtUniSuperficie = new javax.swing.JTextField();
        jLabel29 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        txtNumero = new javax.swing.JTextField();
        cmbLocaReg = new javax.swing.JComboBox();
        jLabel26 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        cmbEstadoContri = new javax.swing.JComboBox();
        cmbComuna = new javax.swing.JComboBox();
        jLabel24 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        cmbTipoConstru = new javax.swing.JComboBox();
        cmbMoneda = new javax.swing.JComboBox();
        jLabel22 = new javax.swing.JLabel();
        jcFechUltDebito = new com.toedter.calendar.JDateChooser();
        jcFechModifi = new com.toedter.calendar.JDateChooser();
        txtFechaCreacion = new javax.swing.JTextField();
        jcFechUltTasacion = new com.toedter.calendar.JDateChooser();
        jButton10 = new javax.swing.JButton();
        btnActualizar = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        tbSalidaImprimirModificacionHipo = new javax.swing.JTable();
        btnImprimirHipo = new javax.swing.JButton();
        btnMenuHipo = new javax.swing.JButton();
        jPanel11 = new javax.swing.JPanel();
        txtBuscarRolSiiImprimir = new javax.swing.JTextField();
        btnBuscarHipo = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("MODIFICACIÓN GARANTÍA HIPOTECARIA");
        setResizable(false);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        jLabel1.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel1.setText("MODIFICACIÓN GARANTÍA HIPOTECARIA");

        jTabbedPane1.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N

        btnMenuPrincipal.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuPrincipal.setText("MENÚ PRINCIPAL");
        btnMenuPrincipal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalActionPerformed(evt);
            }
        });

        pnlDatosPersoGara.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS PERSONALES GARANTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel36.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel36.setText("RUT");

        jLabel37.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel37.setText("APELLIDO PATERNO");

        jLabel39.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel39.setText("APELLIDO MATERNO");

        jLabel40.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel40.setText("NOMBRE");

        txtNombre.setBackground(new java.awt.Color(255, 255, 102));
        txtNombre.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNombre.setEnabled(false);

        txtApellMaterno.setBackground(new java.awt.Color(255, 255, 102));
        txtApellMaterno.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellMaterno.setEnabled(false);

        txtApellPaterno.setBackground(new java.awt.Color(255, 255, 102));
        txtApellPaterno.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellPaterno.setEnabled(false);

        txtRut.setBackground(new java.awt.Color(255, 255, 102));
        txtRut.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRut.setEnabled(false);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel37)
                    .addComponent(jLabel36))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtRut, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellPaterno, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 73, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel39)
                    .addComponent(jLabel40))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellMaterno, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(196, 196, 196))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(txtRut, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel40)
                    .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(txtApellPaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39)
                    .addComponent(txtApellMaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlDatosPersoGaraLayout = new javax.swing.GroupLayout(pnlDatosPersoGara);
        pnlDatosPersoGara.setLayout(pnlDatosPersoGaraLayout);
        pnlDatosPersoGaraLayout.setHorizontalGroup(
            pnlDatosPersoGaraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersoGaraLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlDatosPersoGaraLayout.setVerticalGroup(
            pnlDatosPersoGaraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDatosPersoGaraLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pnlBuscarFolio.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE N° FOLIO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel31.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel31.setText("N° FOLIO");

        txtBuscarPorFolio.setDoubleBuffered(true);

        btnBuscarFolio.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarFolio.setText("BUSCAR");
        btnBuscarFolio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarFolioActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlBuscarFolioLayout = new javax.swing.GroupLayout(pnlBuscarFolio);
        pnlBuscarFolio.setLayout(pnlBuscarFolioLayout);
        pnlBuscarFolioLayout.setHorizontalGroup(
            pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBuscarFolioLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel31)
                .addGap(18, 18, 18)
                .addGroup(pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtBuscarPorFolio)
                    .addComponent(btnBuscarFolio, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(52, Short.MAX_VALUE))
        );
        pnlBuscarFolioLayout.setVerticalGroup(
            pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlBuscarFolioLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel31)
                    .addComponent(txtBuscarPorFolio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarFolio)
                .addContainerGap())
        );

        pnlBuscarRol.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE ROL SII", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel30.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel30.setText("ROL");

        btnBuscarSii.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarSii.setText("BUSCAR");
        btnBuscarSii.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarSiiActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlBuscarRolLayout = new javax.swing.GroupLayout(pnlBuscarRol);
        pnlBuscarRol.setLayout(pnlBuscarRolLayout);
        pnlBuscarRolLayout.setHorizontalGroup(
            pnlBuscarRolLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBuscarRolLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel30)
                .addGap(18, 18, 18)
                .addGroup(pnlBuscarRolLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtBuscarPorSii)
                    .addComponent(btnBuscarSii, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(52, Short.MAX_VALUE))
        );
        pnlBuscarRolLayout.setVerticalGroup(
            pnlBuscarRolLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlBuscarRolLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlBuscarRolLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel30)
                    .addComponent(txtBuscarPorSii, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarSii)
                .addContainerGap())
        );

        buttonGroup1.add(chkBuscarRol);
        chkBuscarRol.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkBuscarRol.setText("BUSCAR POR ROL");
        chkBuscarRol.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkBuscarRolActionPerformed(evt);
            }
        });

        buttonGroup1.add(chkBuscarFolio);
        chkBuscarFolio.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkBuscarFolio.setText("BUSCAR POR N° FOLIO");
        chkBuscarFolio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkBuscarFolioActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(pnlDatosPersoGara, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(btnMenuPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGap(0, 147, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnlBuscarFolio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkBuscarFolio))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(chkBuscarRol)
                            .addComponent(pnlBuscarRol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(157, 157, 157))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(chkBuscarFolio, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(chkBuscarRol, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlBuscarFolio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnlBuscarRol, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addComponent(pnlDatosPersoGara, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(128, 128, 128)
                .addComponent(btnMenuPrincipal)
                .addContainerGap(62, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("INFO. GARANTE", jPanel1);

        pnlDescripGarantia.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DESCRIPCIÓN GARANTIA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtOtroComentario.setColumns(20);
        txtOtroComentario.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtOtroComentario.setRows(5);
        txtOtroComentario.setToolTipText("");
        jScrollPane3.setViewportView(txtOtroComentario);

        txtDescripcion.setBackground(new java.awt.Color(255, 255, 102));
        txtDescripcion.setColumns(60);
        txtDescripcion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtDescripcion.setRows(10);
        txtDescripcion.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtDescripcion.setEnabled(false);
        txtDescripcion.setMargin(new java.awt.Insets(3, 5, 3, 5));
        jScrollPane4.setViewportView(txtDescripcion);

        lblDescripcion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblDescripcion.setText("DESCRIPCIÓN");

        javax.swing.GroupLayout pnlDescripGarantiaLayout = new javax.swing.GroupLayout(pnlDescripGarantia);
        pnlDescripGarantia.setLayout(pnlDescripGarantiaLayout);
        pnlDescripGarantiaLayout.setHorizontalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDescripGarantiaLayout.createSequentialGroup()
                .addGap(70, 70, 70)
                .addComponent(lblDescripcion)
                .addGap(18, 18, 18)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 586, Short.MAX_VALUE)
                    .addComponent(jScrollPane3))
                .addContainerGap())
        );
        pnlDescripGarantiaLayout.setVerticalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDescripGarantiaLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblDescripcion)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(250, 250, 250))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.PREFERRED_SIZE, 359, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(101, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("DESCRIP. GARANTÍA", jPanel2);

        pnlCreacionGaraHipo.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "MODIFICACIÓN GARANTÍA HIPOTECARIA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N
        pnlCreacionGaraHipo.setPreferredSize(new java.awt.Dimension(692, 600));

        jPanel4.setPreferredSize(new java.awt.Dimension(740, 490));

        jLabel14.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel14.setText("TIPO GARANTÍA");

        jLabel15.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel15.setText("GRADO PREFERENCÍA");

        jLabel16.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel16.setText("MTS. CONSTRUIDOS");

        jLabel17.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel17.setText("AÑOS REPERTORIO");

        jLabel18.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel18.setText("A. FOJAS");

        jLabel19.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel19.setText("FECHA EXTINCIÓN");

        jLabel20.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel20.setText("FECHA ÚLT. REVALUO");

        jLabel21.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel21.setText("FECHA ÚLT. CRÉDITO");

        cmbGradoPreferencia.setEditable(true);
        cmbGradoPreferencia.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbGradoPreferencia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione" }));

        cmbTipoGtia.setEditable(true);
        cmbTipoGtia.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbTipoGtia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione" }));

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel15)
                    .addComponent(jLabel14)
                    .addComponent(jLabel16)
                    .addComponent(jLabel17)
                    .addComponent(jLabel18)
                    .addComponent(jLabel20)
                    .addComponent(jLabel19)
                    .addComponent(jLabel21))
                .addGap(16, 16, 16)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(cmbGradoPreferencia, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cmbTipoGtia, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jcFechExtincion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jcFechUltRevaluo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jcFechUltCredito, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(txtMtsConstruidos)
                    .addComponent(txtAñosRepertorio)
                    .addComponent(txtFojas))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(cmbTipoGtia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(cmbGradoPreferencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(txtMtsConstruidos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(txtAñosRepertorio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(txtFojas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel19)
                    .addComponent(jcFechExtincion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel20)
                    .addComponent(jcFechUltRevaluo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel21)
                    .addComponent(jcFechUltCredito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ADJUNTAR ARCHIVO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel46.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel46.setText("ARCHIVO");

        txtSubirArchivo.setEditable(false);

        btnExaminar.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnExaminar.setText("EXAMINAR");
        btnExaminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExaminarActionPerformed(evt);
            }
        });

        txtAdjuntar.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtAdjuntar.setText("ADJUNTAR");
        txtAdjuntar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAdjuntarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel46)
                .addGap(18, 18, 18)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(btnExaminar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtAdjuntar))
                    .addComponent(txtSubirArchivo, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(18, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel46)
                    .addComponent(txtSubirArchivo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnExaminar)
                    .addComponent(txtAdjuntar))
                .addContainerGap())
        );

        jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel5.setText("SUCURSAL");

        jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel6.setText("COBERTURA");

        jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel7.setText("SUPERFICIE");

        jLabel8.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel8.setText("DIRECCIÓN (CRÉDITO)");

        jLabel9.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel9.setText("REGISTRO CBR");

        jLabel10.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel10.setText("ROL SII");

        jLabel11.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel11.setText("UNIDAD SUPERFICIE");

        jLabel12.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel12.setText("FECHA CREACIÓN");

        jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel13.setText("FECHA ÚLT. DÉBITO");

        cmbSucursal.setEditable(true);
        cmbSucursal.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbSucursal.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione" }));

        cmbCobertura.setEditable(true);
        cmbCobertura.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbCobertura.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione" }));

        jLabel29.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel29.setText("FECHA MODIFICA.");

        jLabel28.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel28.setText("FECHA ÚLT. TASACIÓN");

        jLabel27.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel27.setText("NÚMERO DE PROPIEDAD");

        cmbLocaReg.setEditable(true);
        cmbLocaReg.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbLocaReg.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione Local. Reg." }));

        jLabel26.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel26.setText("LOCALIDAD REGISTRO");

        jLabel25.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel25.setText("ESTADO CONTRIB.");

        cmbEstadoContri.setEditable(true);
        cmbEstadoContri.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbEstadoContri.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione Est. Constrib." }));

        cmbComuna.setEditable(true);
        cmbComuna.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbComuna.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione" }));

        jLabel24.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel24.setText("COMUNA");

        jLabel23.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel23.setText("TIPO CONSTRUCCIÓN");

        cmbTipoConstru.setEditable(true);
        cmbTipoConstru.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbTipoConstru.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione" }));

        cmbMoneda.setEditable(true);
        cmbMoneda.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbMoneda.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione" }));

        jLabel22.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel22.setText("MONEDA");

        txtFechaCreacion.setEditable(false);
        txtFechaCreacion.setBackground(new java.awt.Color(255, 255, 0));

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel8)
                            .addComponent(jLabel13)
                            .addComponent(jLabel12)
                            .addComponent(jLabel5)
                            .addComponent(jLabel6)
                            .addComponent(jLabel7)
                            .addComponent(jLabel9)
                            .addComponent(jLabel10)
                            .addComponent(jLabel11)
                            .addComponent(jLabel29)
                            .addComponent(jLabel28))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel27)
                            .addComponent(jLabel26)
                            .addComponent(jLabel25)
                            .addComponent(jLabel24)
                            .addComponent(jLabel23)
                            .addComponent(jLabel22))
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel6Layout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jcFechModifi, javax.swing.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE)
                                    .addComponent(txtNumero)
                                    .addComponent(cmbLocaReg, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(cmbEstadoContri, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jcFechUltTasacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel6Layout.createSequentialGroup()
                                .addGap(16, 16, 16)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(cmbTipoConstru, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(cmbMoneda, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(txtFechaCreacion, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE)
                                    .addComponent(txtDireccion, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE)
                                    .addComponent(cmbCobertura, javax.swing.GroupLayout.Alignment.LEADING, 0, 165, Short.MAX_VALUE)
                                    .addComponent(cmbSucursal, javax.swing.GroupLayout.Alignment.LEADING, 0, 165, Short.MAX_VALUE)
                                    .addComponent(txtSuperficie, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtRegistroCbr, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtRolSii, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtUniSuperficie, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jcFechUltDebito, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(cmbComuna, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addGap(0, 0, Short.MAX_VALUE))))))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(cmbSucursal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(cmbCobertura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(txtSuperficie, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(txtDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(txtRegistroCbr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(txtRolSii, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(txtUniSuperficie, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(txtFechaCreacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel13)
                    .addComponent(jcFechUltDebito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(cmbMoneda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23)
                    .addComponent(cmbTipoConstru, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24)
                    .addComponent(cmbComuna, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(cmbEstadoContri, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel26)
                    .addComponent(cmbLocaReg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel27)
                    .addComponent(txtNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel28)
                    .addComponent(jcFechUltTasacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel29)
                    .addComponent(jcFechModifi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(147, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 77, Short.MAX_VALUE)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jScrollPane1.setViewportView(jPanel4);

        javax.swing.GroupLayout pnlCreacionGaraHipoLayout = new javax.swing.GroupLayout(pnlCreacionGaraHipo);
        pnlCreacionGaraHipo.setLayout(pnlCreacionGaraHipoLayout);
        pnlCreacionGaraHipoLayout.setHorizontalGroup(
            pnlCreacionGaraHipoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 759, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        pnlCreacionGaraHipoLayout.setVerticalGroup(
            pnlCreacionGaraHipoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE)
        );

        jButton10.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jButton10.setText("MENÚ PRINCIPAL >>");
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });

        btnActualizar.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnActualizar.setText("ACTUALIZAR");
        btnActualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActualizarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlCreacionGaraHipo, javax.swing.GroupLayout.DEFAULT_SIZE, 775, Short.MAX_VALUE)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(btnActualizar)
                        .addGap(168, 168, 168)
                        .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlCreacionGaraHipo, javax.swing.GroupLayout.PREFERRED_SIZE, 366, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton10)
                    .addComponent(btnActualizar))
                .addContainerGap(51, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("MODIFICACIÓN GARANTÍA HIPOTECARIA", jPanel3);

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ÁREA IMPRESIÓN", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        tbSalidaImprimirModificacionHipo.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbSalidaImprimirModificacionHipo.setEnabled(false);
        jScrollPane2.setViewportView(tbSalidaImprimirModificacionHipo);

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 743, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE)
                .addContainerGap())
        );

        btnImprimirHipo.setText("IMPRIMIR");
        btnImprimirHipo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirHipoActionPerformed(evt);
            }
        });

        btnMenuHipo.setText("MENÚ PRINCIPAL");
        btnMenuHipo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuHipoActionPerformed(evt);
            }
        });

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE ROL SII", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarHipo.setText("BUSCAR");
        btnBuscarHipo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarHipoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(38, 38, 38)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(btnBuscarHipo, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE)
                    .addComponent(txtBuscarRolSiiImprimir))
                .addContainerGap(33, Short.MAX_VALUE))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtBuscarRolSiiImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarHipo)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnImprimirHipo, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(165, 165, 165)
                        .addComponent(btnMenuHipo, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(27, 27, 27))))
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGap(283, 283, 283)
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnMenuHipo)
                    .addComponent(btnImprimirHipo))
                .addGap(11, 11, 11))
        );

        jTabbedPane1.addTab("IMPRIMIR", jPanel7);

        jLabel3.setText("MENÚ PRINCIPAL\\MODIFICACIÓN GARANTÍA HIPOTECARIA");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(108, 108, 108)
                        .addComponent(jLabel1))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel3)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(jTabbedPane1)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(18, 18, 18)
                .addComponent(jTabbedPane1))
        );

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnMenuPrincipalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        ModificacionGarantiaHipotecaria.this.dispose();
    }//GEN-LAST:event_btnMenuPrincipalActionPerformed

    private void btnBuscarFolioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarFolioActionPerformed
       limpiar();
        
          try {   
              if(this.txtBuscarPorFolio.getText().length() > 0)
            {
        if (!this.txtBuscarPorFolio.getText().matches("[ 0-9]*")) // expresiones regulares para validar
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese solo números");
            this.txtBuscarPorFolio.setText("");
            this.txtBuscarPorSii.setText("");
            this.btnActualizar.setVisible(false);
        }
        else
        {
            garantia = reg.buscarPorFolioHipo(Integer.parseInt(this.txtBuscarPorFolio.getText()));
        if(garantia.getFolio_garantia_hipo() == 0)
        {
            javax.swing.JOptionPane.showMessageDialog(null, "Garantia NO ENCONTRADA");
            txtBuscarPorFolio.setText("");
            this.txtBuscarPorSii.setText("");
            this.btnActualizar.setVisible(false);    
        }
        else
        {
           
             if(garantia.getEstado_hipo() == null )
            {
      
            this.txtRut.setText(garantia.getRut_gara_hipo());
            this.txtApellPaterno.setText(garantia.getApell_paterno_hipo());
            this.txtApellMaterno.setText(garantia.getApell_materno_hipo());
            this.txtNombre.setText(garantia.getNombre_hipo());
            this.txtDescripcion.setText(garantia.getDescrip_hipo());
            this.txtOtroComentario.setText(garantia.getComent_hipo());       
            this.txtSuperficie.setText(String.valueOf(garantia.getSuperficie_hipo()));
            txtFechaCreacion.setText(String.valueOf(garantia.getFech_crea_hipo()));
            Date aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_debito_hipo());
            this.jcFechUltDebito.setDate(aux);
            this.txtDireccion.setText(garantia.getDireccion_hipo());
            this.txtRegistroCbr.setText(garantia.getRegistro_cbr_hipo());
            this.txtRolSii.setText(garantia.getRol_sii_hipo());
            this.txtUniSuperficie.setText(String.valueOf(garantia.getSuperficie_hipo()));
            this.txtNumero.setText(String.valueOf(garantia.getNum_hipo()));
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_tasa_hipo());
            this.jcFechUltTasacion.setDate(aux);
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_modifi_hipo());
            this.jcFechModifi.setDate(aux);
            this.txtMtsConstruidos.setText(String.valueOf(garantia.getMts_construidos_hipo()));
            this.txtAñosRepertorio.setText(String.valueOf(garantia.getAnos_repertorio_hipo()));
            this.txtFojas.setText(String.valueOf(garantia.getA_fojas_hipo()));
            this.jcFechExtincion.setDate(garantia.getFech_extincion_hipo());
            
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_revaluo_hipo());
            this.jcFechUltRevaluo.setDate(aux);
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_credito_hipo());
            this.jcFechUltCredito.setDate(aux);
            this.cmbSucursal.setSelectedItem(garantia.getSucursal_hipo().toString());
            this.cmbComuna.setSelectedItem(garantia.getComuna_hipo().toString());
            this.cmbCobertura.setSelectedItem(garantia.getCobertura_hipo());
            this.cmbEstadoContri.setSelectedItem(garantia.getEstado_constrib_hipo());
            this.cmbGradoPreferencia.setSelectedItem(garantia.getGrado_prefere_hipo());
            this.cmbLocaReg.setSelectedItem(garantia.getLocalidad_reg_hipo());
            this.cmbMoneda.setSelectedItem(garantia.getMoneda_hipo());
            this.cmbTipoConstru.setSelectedItem(garantia.getTipo_construccion_hipo());
            this.cmbTipoGtia.setSelectedItem(garantia.getTipo_garantia_hipo());
            javax.swing.JOptionPane.showMessageDialog(this, "Aun no ha sido Aprobado");
            this.btnActualizar.setVisible(true);
            this.txtBuscarPorSii.setText("");
            }
            else
             {
            this.txtRut.setText(garantia.getRut_gara_hipo());
            this.txtApellPaterno.setText(garantia.getApell_paterno_hipo());
            this.txtApellMaterno.setText(garantia.getApell_materno_hipo());
            this.txtNombre.setText(garantia.getNombre_hipo());
            this.txtDescripcion.setText(garantia.getDescrip_hipo());
            this.txtOtroComentario.setText(garantia.getComent_hipo());
           
            this.txtSuperficie.setText(String.valueOf(garantia.getSuperficie_hipo()));
            txtFechaCreacion.setText(String.valueOf(garantia.getFech_crea_hipo()));
            Date aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_debito_hipo());
            this.jcFechUltDebito.setDate(aux);
            this.txtDireccion.setText(garantia.getDireccion_hipo());
            this.txtRegistroCbr.setText(garantia.getRegistro_cbr_hipo());
            this.txtRolSii.setText(garantia.getRol_sii_hipo());
            this.txtUniSuperficie.setText(String.valueOf(garantia.getSuperficie_hipo()));
            this.txtNumero.setText(String.valueOf(garantia.getNum_hipo()));
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_tasa_hipo());
            this.jcFechUltTasacion.setDate(aux);
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_modifi_hipo());
            this.jcFechModifi.setDate(aux);
            this.txtMtsConstruidos.setText(String.valueOf(garantia.getMts_construidos_hipo()));
            this.txtAñosRepertorio.setText(String.valueOf(garantia.getAnos_repertorio_hipo()));
            this.txtFojas.setText(String.valueOf(garantia.getA_fojas_hipo()));
            this.jcFechExtincion.setDate(garantia.getFech_extincion_hipo());
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_revaluo_hipo());
            this.jcFechUltRevaluo.setDate(aux);
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_credito_hipo());
            this.jcFechUltCredito.setDate(aux);
            this.cmbSucursal.setSelectedItem(garantia.getSucursal_hipo().toString());
            this.cmbComuna.setSelectedItem(garantia.getComuna_hipo().toString());
            this.cmbCobertura.setSelectedItem(garantia.getCobertura_hipo());
            this.cmbEstadoContri.setSelectedItem(garantia.getEstado_constrib_hipo());
            this.cmbGradoPreferencia.setSelectedItem(garantia.getGrado_prefere_hipo());
            this.cmbLocaReg.setSelectedItem(garantia.getLocalidad_reg_hipo());
            this.cmbMoneda.setSelectedItem(garantia.getMoneda_hipo());
            this.cmbTipoConstru.setSelectedItem(garantia.getTipo_construccion_hipo());
            this.cmbTipoGtia.setSelectedItem(garantia.getTipo_garantia_hipo());
            this.btnActualizar.setVisible(true);
            this.txtBuscarPorSii.setText("");
            
            if (garantia.getEstado_hipo().equalsIgnoreCase("Aprobada")) {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia ya fue aprobada. No puede ser modificada.");
                MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                venMenuPrincipal.setVisible(true);
                ModificacionGarantiaHipotecaria.this.dispose();
                 this.txtBuscarPorSii.setText("");
            }
            if (garantia.getEstado_hipo().equalsIgnoreCase("Rechazada")) {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia fue rechazada.");
               this.txtBuscarPorSii.setText("");
               this.btnActualizar.setVisible(true);
             }
            
             }
        }
        }}
           else
    {
        javax.swing.JOptionPane.showMessageDialog(this, "Ingrese número de folio");
         this.txtBuscarPorSii.setText("");
    }
          } catch (Exception e) {
            e.getMessage();
            
        }
    }//GEN-LAST:event_btnBuscarFolioActionPerformed

    private void btnActualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActualizarActionPerformed
         
        try{
            if(validacion()<1)
            {
        garantia = new garantiaHipotecariaDTO();
        garantia.setSuperficie_hipo(Integer.parseInt(this.txtSuperficie.getText().trim()));
        garantia.setDireccion_hipo(this.txtDireccion.getText());
        garantia.setRegistro_cbr_hipo(this.txtRegistroCbr.getText());
        garantia.setRol_sii_hipo(this.txtRolSii.getText());
        garantia.setUni_superficie_hipo(this.txtUniSuperficie.getText());
        garantia.setFech_ult_debito_hipo(new SimpleDateFormat("dd/MM/yyyy").format(jcFechUltDebito.getDate()));
        garantia.setNum_hipo(Integer.parseInt(this.txtNumero.getText().trim()));
        garantia.setFech_ult_tasa_hipo(new SimpleDateFormat("dd/MM/yyyy").format(jcFechUltTasacion.getDate()));
        garantia.setFech_modifi_hipo(new SimpleDateFormat("dd/MM/yyyy").format(jcFechModifi.getDate()));
        garantia.setMts_construidos_hipo(Integer.parseInt(this.txtMtsConstruidos.getText().trim()));
        garantia.setAnos_repertorio_hipo(Integer.parseInt(this.txtAñosRepertorio.getText().trim()));
        garantia.setA_fojas_hipo(Integer.parseInt(this.txtFojas.getText().trim()));
        garantia.setFech_extincion_hipo(new Date(jcFechExtincion.getDate().getTime()));
        garantia.setFech_ult_revaluo_hipo(new SimpleDateFormat("dd/MM/yyyy").format(jcFechUltRevaluo.getDate()));
        garantia.setFech_ult_credito_hipo(new SimpleDateFormat("dd/MM/yyyy").format(jcFechUltCredito.getDate()));
        garantia.setComent_hipo(this.txtOtroComentario.getText());
        garantia.setAdjuntar_hipo(this.txtSubirArchivo.getText().trim());
        garantia.setSucursal_hipo(this.cmbSucursal.getSelectedItem().toString());
        garantia.setCobertura_hipo(this.cmbCobertura.getSelectedItem().toString());
        garantia.setMoneda_hipo(this.cmbMoneda.getSelectedItem().toString());
        garantia.setTipo_construccion_hipo(this.cmbTipoConstru.getSelectedItem().toString());
        garantia.setComuna_hipo(this.cmbComuna.getSelectedItem().toString());
        garantia.setEstado_constrib_hipo(this.cmbEstadoContri.getSelectedItem().toString());
        garantia.setLocalidad_reg_hipo(this.cmbLocaReg.getSelectedItem().toString());
        garantia.setTipo_garantia_hipo(this.cmbTipoGtia.getSelectedItem().toString());
        garantia.setGrado_prefere_hipo(this.cmbGradoPreferencia.getSelectedItem().toString());
        
        int respuesta = javax.swing.JOptionPane.showConfirmDialog(null, "Esta seguro de modificar esta Garantia ?", "Actualizar Datos", JOptionPane.OK_CANCEL_OPTION);
        //Si acepta
        if(respuesta == 0)
        {
            
            reg.modificarGtiaHipotecariaPorRolSii(garantia, user);
            javax.swing.JOptionPane.showMessageDialog(this, "Garantia Hipotecaria Modificada con Exito");
            MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
            venMenuPrincipal.setVisible(true);
            ModificacionGarantiaHipotecaria.this.dispose();
        }}
        }catch(Exception e)
        {
            e.getMessage();
        }
       
    }//GEN-LAST:event_btnActualizarActionPerformed

    private void btnBuscarSiiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarSiiActionPerformed
         limpiar();
        try {   
       
          if(this.txtBuscarPorSii.getText().length() > 0)
            {   
        garantia = reg.buscarPorRol(txtBuscarPorSii.getText());
        if(garantia.getFolio_garantia_hipo() == 0)
        {
            javax.swing.JOptionPane.showMessageDialog(null, "Garantia NO ENCONTRADA");
            this.txtBuscarPorFolio.setText("");
        }
        else
        {
            if(garantia.getEstado_hipo() == null)
            {
      
            this.txtRut.setText(garantia.getRut_gara_hipo());
//            this.txtNumFolio.setText(String.valueOf(garantia.getFolio_garantia_hipo()));
            this.txtApellPaterno.setText(garantia.getApell_paterno_hipo());
            this.txtApellMaterno.setText(garantia.getApell_materno_hipo());
            this.txtNombre.setText(garantia.getNombre_hipo());
            this.txtDescripcion.setText(garantia.getDescrip_hipo());
            this.txtOtroComentario.setText(garantia.getComent_hipo());       
            this.txtSuperficie.setText(String.valueOf(garantia.getSuperficie_hipo()));
            String fechaCreacion = (new SimpleDateFormat("dd/MM/yyyy").format(garantia.getFech_crea_hipo()));
            txtFechaCreacion.setText(fechaCreacion);
            Date aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_debito_hipo());
            this.jcFechUltDebito.setDate(aux);
            this.txtDireccion.setText(garantia.getDireccion_hipo());
            this.txtRegistroCbr.setText(garantia.getRegistro_cbr_hipo());
            this.txtRolSii.setText(garantia.getRol_sii_hipo());
            this.txtUniSuperficie.setText(String.valueOf(garantia.getSuperficie_hipo()));
            this.txtNumero.setText(String.valueOf(garantia.getNum_hipo()));
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_tasa_hipo());
            this.jcFechUltTasacion.setDate(aux);
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_modifi_hipo());
            this.jcFechModifi.setDate(aux);
            this.txtMtsConstruidos.setText(String.valueOf(garantia.getMts_construidos_hipo()));
            this.txtAñosRepertorio.setText(String.valueOf(garantia.getAnos_repertorio_hipo()));
            this.txtFojas.setText(String.valueOf(garantia.getA_fojas_hipo()));
            this.jcFechExtincion.setDate(new Date(garantia.getFech_extincion_hipo().getTime()));     
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_revaluo_hipo());
            this.jcFechUltRevaluo.setDate(aux);
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_credito_hipo());
            this.jcFechUltCredito.setDate(aux);
            this.cmbSucursal.setSelectedItem(garantia.getSucursal_hipo());
            this.cmbComuna.setSelectedItem(garantia.getComuna_hipo());
            this.cmbCobertura.setSelectedItem(garantia.getCobertura_hipo());
            this.cmbEstadoContri.setSelectedItem(garantia.getEstado_constrib_hipo());
            this.cmbGradoPreferencia.setSelectedItem(garantia.getGrado_prefere_hipo());
            this.cmbLocaReg.setSelectedItem(garantia.getLocalidad_reg_hipo());
            this.cmbMoneda.setSelectedItem(garantia.getMoneda_hipo());
            this.cmbTipoConstru.setSelectedItem(garantia.getTipo_construccion_hipo());
            this.cmbTipoGtia.setSelectedItem(garantia.getTipo_garantia_hipo());
            javax.swing.JOptionPane.showMessageDialog(this, "Aun no ha sido Aprobado");
            this.btnActualizar.setVisible(true);
            this.txtBuscarPorFolio.setText("");
            }
            else
            {
            this.txtRut.setText(garantia.getRut_gara_hipo());
            this.txtApellPaterno.setText(garantia.getApell_paterno_hipo());
            this.txtApellMaterno.setText(garantia.getApell_materno_hipo());
            this.txtNombre.setText(garantia.getNombre_hipo());
            this.txtDescripcion.setText(garantia.getDescrip_hipo());
            this.txtOtroComentario.setText(garantia.getComent_hipo());
            
            this.txtSuperficie.setText(String.valueOf(garantia.getSuperficie_hipo()));
            String fechaCreacion = (new SimpleDateFormat("dd/MM/yyyy").format(garantia.getFech_crea_hipo()));
            txtFechaCreacion.setText(fechaCreacion);
            Date aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_debito_hipo());
            this.jcFechUltDebito.setDate(aux);
            this.txtDireccion.setText(garantia.getDireccion_hipo());
            this.txtRegistroCbr.setText(garantia.getRegistro_cbr_hipo());
            this.txtRolSii.setText(garantia.getRol_sii_hipo());
            this.txtUniSuperficie.setText(String.valueOf(garantia.getSuperficie_hipo()));
            this.txtNumero.setText(String.valueOf(garantia.getNum_hipo()));
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_tasa_hipo());
            this.jcFechUltTasacion.setDate(aux);
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_modifi_hipo());
            this.jcFechModifi.setDate(aux);
            this.txtMtsConstruidos.setText(String.valueOf(garantia.getMts_construidos_hipo()));
            this.txtAñosRepertorio.setText(String.valueOf(garantia.getAnos_repertorio_hipo()));
            this.txtFojas.setText(String.valueOf(garantia.getA_fojas_hipo()));
            this.jcFechExtincion.setDate(new Date(garantia.getFech_extincion_hipo().getTime()));
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_revaluo_hipo());
            this.jcFechUltRevaluo.setDate(aux);
            aux = DTO.ConversionFechas.convertToDate(garantia.getFech_ult_credito_hipo());
            this.jcFechUltCredito.setDate(aux);
            this.cmbSucursal.setSelectedItem(garantia.getSucursal_hipo());
            this.cmbComuna.setSelectedItem(garantia.getComuna_hipo());
            this.cmbCobertura.setSelectedItem(garantia.getCobertura_hipo());
            this.cmbEstadoContri.setSelectedItem(garantia.getEstado_constrib_hipo());
            this.cmbGradoPreferencia.setSelectedItem(garantia.getGrado_prefere_hipo());
            this.cmbLocaReg.setSelectedItem(garantia.getLocalidad_reg_hipo());
            this.cmbMoneda.setSelectedItem(garantia.getMoneda_hipo());
            this.cmbTipoConstru.setSelectedItem(garantia.getTipo_construccion_hipo());
            this.cmbTipoGtia.setSelectedItem(garantia.getTipo_garantia_hipo());
            this.txtBuscarPorFolio.setText("");
            
            if (garantia.getEstado_hipo().equalsIgnoreCase("Aprobada")) {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia ya fue aprobada. No puede ser modificada.");
                MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                venMenuPrincipal.setVisible(true);
                ModificacionGarantiaHipotecaria.this.dispose();
                this.txtBuscarPorFolio.setText("");
            }
            if (garantia.getEstado_hipo().equalsIgnoreCase("Rechazada")) {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia fue rechazada.");
                this.txtBuscarPorFolio.setText("");
                this.btnActualizar.setVisible(true);
                
            }
            }
        } }else
    {
        javax.swing.JOptionPane.showMessageDialog(this, "Ingrese número de Rol");
        this.txtBuscarPorFolio.setText("");
    }
        }
         catch (Exception e) {
            e.getMessage();
            
        }
    }//GEN-LAST:event_btnBuscarSiiActionPerformed

    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        ModificacionGarantiaHipotecaria.this.dispose();
    }//GEN-LAST:event_jButton10ActionPerformed

    private void chkBuscarFolioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkBuscarFolioActionPerformed
        if (chkBuscarFolio.isSelected()) {
            pnlBuscarFolio.setVisible(true);
            pnlBuscarRol.setVisible(false);
        }
        else
        {
            pnlBuscarFolio.setVisible(false);
        }
    }//GEN-LAST:event_chkBuscarFolioActionPerformed

    private void chkBuscarRolActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkBuscarRolActionPerformed
        if (chkBuscarRol.isSelected()) {
            pnlBuscarRol.setVisible(true);
            pnlBuscarFolio.setVisible(false);
        }
        else
        {
            pnlBuscarRol.setVisible(false);
        }
    }//GEN-LAST:event_chkBuscarRolActionPerformed

    private void btnExaminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExaminarActionPerformed
          JFileChooser filechooser = new JFileChooser();
        int opcion = filechooser.showOpenDialog(this);
        if (opcion==JFileChooser.APPROVE_OPTION){
            txtSubirArchivo.setText(filechooser.getSelectedFile().getPath());
        }
    }//GEN-LAST:event_btnExaminarActionPerformed

    private void txtAdjuntarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAdjuntarActionPerformed
        if(!this.txtSubirArchivo.getText().equals("")){
        garantiaHipotecariaDTO garaHipo = new garantiaHipotecariaDTO();
        garaHipo.setAdjuntar_hipo(this.txtSubirArchivo.getText().trim());
        javax.swing.JOptionPane.showMessageDialog(this, "Archivo guardado");
        }else{
        javax.swing.JOptionPane.showMessageDialog(this, "Adjunte archivo");
        }
    }//GEN-LAST:event_txtAdjuntarActionPerformed

    private void btnMenuHipoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuHipoActionPerformed
      MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        ModificacionGarantiaHipotecaria.this.dispose();
    }//GEN-LAST:event_btnMenuHipoActionPerformed

    private void btnBuscarHipoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarHipoActionPerformed
          try
        {

            
            ArrayList<garantiaHipotecariaDTO> salida = reg.ListarPorRolHipo(this.txtBuscarRolSiiImprimir.getText().trim());
            if(salida.isEmpty())
            {
                 
                 this.txtBuscarRolSiiImprimir.setText(null);
                DefaultTableModel modelo =(DefaultTableModel)this.tbSalidaImprimirModificacionHipo.getModel();      
                modelo.setNumRows(0);
                javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
               
            }else
            {
            DefaultTableModel modelo =(DefaultTableModel)this.tbSalidaImprimirModificacionHipo.getModel(); 
          
            modelo.setColumnCount(0);
                if(modelo.getColumnCount() < 1)
                {
                    
                    Object[] arr1 ={"Rut: ","Nombre: ","Calle: ", "Garantía: ", "Número identificatorio Hipotecario: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal:  ",
                        "Cobertura: ","Superficie: ","Dirección (Crédito): ", "Registro CBR: ","Unidad Superficie: ",
                        "Fecha último débito: ","Moneda: ","Tipo construcción: ","Comuna: ","Estado contribución: ",
                        "Localidad Registro: ","Fecha última tasación: ","Tipo garantía: ","Grado preferencía: ",
                        "Metros. construidos: ","Años repertorios: ","A. Fojas: ","Fecha vencimiento: ","Fecha último Revaluo: ",
                        "Fecha último crédito: ","Estado de la garantía: ","Fecha Aprobado/Rechazado: ","Fecha de modificación: ",
                        "Usuario: "  };
                    modelo.addColumn("Concepto", arr1);
                    
                    for(garantiaHipotecariaDTO x: salida)
                {
                    Object[] arr2 ={
                        x.getRut_gara_hipo(),
                        x.getNombre_hipo()  + "  " + x.getApell_materno_hipo() + "  " + x.getApell_materno_hipo(),
                        x.getCalle_hipo() + "   " +x.getNum_dire_hipo(),x.getNombre_garantia_hipo(),x.getRol_sii_hipo(),x.getFolio_garantia_hipo(),
                        x.getMonto_inicial(),x.getFech_crea_hipo(),x.getSucursal_hipo(),x.getCobertura_hipo(),x.getSuperficie_hipo(),
                        x.getDireccion_hipo()+"  "+x.getNum_hipo(),x.getRegistro_cbr_hipo(),x.getUni_superficie_hipo(),x.getFech_ult_debito_hipo(),
                        x.getMoneda_hipo(),x.getTipo_construccion_hipo(),x.getComuna_hipo(),x.getEstado_constrib_hipo(),
                        x.getLocalidad_reg_hipo(),x.getFech_ult_tasa_hipo(),x.getTipo_garantia_hipo(),x.getGrado_prefere_hipo(),
                        x.getMts_construidos_hipo(),x.getAnos_repertorio_hipo(),x.getA_fojas_hipo(),x.getFech_extincion_hipo(),x.getFech_ult_revaluo_hipo(),
                        x.getFech_ult_credito_hipo(),x.getEstado_hipo(),x.getFech_crea_hipo(),x.getFech_modifi_hipo(),x.getNombre_usuario()

                    };
                     
                    modelo.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," "
                                    ," "," "," "," "," "," "," "," "," "," "," "
                                    ," "," "," "," "," "," "," "," "," "," "," "," "};
                    modelo.addColumn("Observaciones",arr3);
                    
                }
            }
        }catch(Exception e)
        {
            e.getMessage();
        }
    }//GEN-LAST:event_btnBuscarHipoActionPerformed

    private void btnImprimirHipoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirHipoActionPerformed
       try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirModificacionHipo.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirModificacionHipo.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirModificacionHipo.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirModificacionHipo.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Modificación Hipotecaria");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(EliminacionGarantiaHipotecaria.class.getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_btnImprimirHipoActionPerformed
    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(ModificacionGarantiaHipotecaria.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(ModificacionGarantiaHipotecaria.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(ModificacionGarantiaHipotecaria.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(ModificacionGarantiaHipotecaria.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the form
//         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new ModificacionGarantiaHipotecaria().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnActualizar;
    private javax.swing.JButton btnBuscarFolio;
    private javax.swing.JButton btnBuscarHipo;
    private javax.swing.JButton btnBuscarSii;
    private javax.swing.JButton btnExaminar;
    private javax.swing.JButton btnImprimirHipo;
    private javax.swing.JButton btnMenuHipo;
    private javax.swing.JButton btnMenuPrincipal;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JCheckBox chkBuscarFolio;
    private javax.swing.JCheckBox chkBuscarRol;
    private javax.swing.JComboBox cmbCobertura;
    private javax.swing.JComboBox cmbComuna;
    private javax.swing.JComboBox cmbEstadoContri;
    private javax.swing.JComboBox cmbGradoPreferencia;
    private javax.swing.JComboBox cmbLocaReg;
    private javax.swing.JComboBox cmbMoneda;
    private javax.swing.JComboBox cmbSucursal;
    private javax.swing.JComboBox cmbTipoConstru;
    private javax.swing.JComboBox cmbTipoGtia;
    private javax.swing.JButton jButton10;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private com.toedter.calendar.JDateChooser jcFechExtincion;
    private com.toedter.calendar.JDateChooser jcFechModifi;
    private com.toedter.calendar.JDateChooser jcFechUltCredito;
    private com.toedter.calendar.JDateChooser jcFechUltDebito;
    private com.toedter.calendar.JDateChooser jcFechUltRevaluo;
    private com.toedter.calendar.JDateChooser jcFechUltTasacion;
    private javax.swing.JLabel lblDescripcion;
    private javax.swing.JPanel pnlBuscarFolio;
    private javax.swing.JPanel pnlBuscarRol;
    private javax.swing.JPanel pnlCreacionGaraHipo;
    private javax.swing.JPanel pnlDatosPersoGara;
    private javax.swing.JPanel pnlDescripGarantia;
    private javax.swing.JTable tbSalidaImprimirModificacionHipo;
    private javax.swing.JButton txtAdjuntar;
    private javax.swing.JTextField txtApellMaterno;
    private javax.swing.JTextField txtApellPaterno;
    private javax.swing.JTextField txtAñosRepertorio;
    private javax.swing.JTextField txtBuscarPorFolio;
    private javax.swing.JTextField txtBuscarPorSii;
    private javax.swing.JTextField txtBuscarRolSiiImprimir;
    private javax.swing.JTextArea txtDescripcion;
    private javax.swing.JTextField txtDireccion;
    private javax.swing.JTextField txtFechaCreacion;
    private javax.swing.JTextField txtFojas;
    private javax.swing.JTextField txtMtsConstruidos;
    private javax.swing.JTextField txtNombre;
    private javax.swing.JTextField txtNumero;
    private javax.swing.JTextArea txtOtroComentario;
    private javax.swing.JTextField txtRegistroCbr;
    private javax.swing.JTextField txtRolSii;
    private javax.swing.JTextField txtRut;
    private javax.swing.JTextField txtSubirArchivo;
    private javax.swing.JTextField txtSuperficie;
    private javax.swing.JTextField txtUniSuperficie;
    // End of variables declaration//GEN-END:variables

    private void limpiar() {
        
            this.txtRut.setText(null);
//            this.txtNumFolio.setText(null);
            this.txtApellPaterno.setText(null);
            this.txtApellMaterno.setText(null);
            this.txtNombre.setText(null);
            this.txtOtroComentario.setText(null);       
            this.txtSuperficie.setText(null);
            this.txtFechaCreacion.setText(null);
            this.txtDireccion.setText(null);
            this.txtRegistroCbr.setText(null);
            this.txtRolSii.setText(null);
            this.txtUniSuperficie.setText(null);
            this.txtNumero.setText(null);
            this.jcFechUltTasacion.setCalendar(null);
            this.jcFechModifi.setCalendar(null);
            this.txtMtsConstruidos.setText(null);
            this.txtAñosRepertorio.setText(null);
            this.txtDescripcion.setText(null);
            this.txtFojas.setText(null);
            this.jcFechExtincion.setCalendar(null);
            this.jcFechUltRevaluo.setCalendar(null);
            this.jcFechUltCredito.setCalendar(null);
            this.jcFechUltDebito.setCalendar(null);
            this.cmbSucursal.setSelectedItem("Seleccione");
            this.cmbComuna.setSelectedItem("Seleccione");
            this.cmbCobertura.setSelectedItem("Seleccione");
            this.cmbEstadoContri.setSelectedItem("Seleccione Est. Constrib");
            this.cmbGradoPreferencia.setSelectedItem("Seleccione");
            this.cmbLocaReg.setSelectedItem("Seleccione Local. Reg.");
            this.cmbMoneda.setSelectedItem("Seleccione");
            this.cmbTipoConstru.setSelectedItem("Seleccione");
            this.cmbTipoGtia.setSelectedItem("Seleccione");
    }

    private int validacion() {
        int contador = 0;
            if(this.txtRut.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE RUT");
                contador++;
            }

            if(this.txtApellPaterno.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE APELLIDO PATERNO");
                contador++;
            }
            if(this.txtApellMaterno.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE APELLIDO MATERNO");
                contador++;
            }
            if(this.txtNombre.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE NOMBRE");
                contador++;
            }           
            if(this.txtSuperficie.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE SUPERFICIE");
                contador++;
            }
            if(this.txtFechaCreacion.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA CREACIÓN");
                contador++;
            }
            if(this.txtDireccion.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE DIRECCIÓN (CRÉDITO)");
                contador++;
            }
            if(this.txtRegistroCbr.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE REGISTRO CBR");
                contador++;
            }
            if(this.txtRolSii.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE ROL SII");
                contador++;
            }
            if(this.txtUniSuperficie.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE SUPERFICIE");
                contador++;
            }
            if(this.txtNumero.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE NUMERO DE PROPIEDAD");
                contador++;
            }
            if(this.jcFechUltTasacion.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA ÚLT. TASACIÓN");
                contador++;
            }
            if(this.jcFechModifi.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE Nº DE FOLIO");
                contador++;
            }
            if(this.txtMtsConstruidos.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE MTS. CONSTRUIDOS");
                contador++;
            }
            if(this.txtAñosRepertorio.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE AÑOS REPERTORIO");
                contador++;
            }
            if(this.txtDescripcion.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE DESCRIPCIÓN");
                contador++;
            }
            if(this.txtFojas.getText().length() ==0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE A.FOJAS");
                contador++;
            }
            if(this.jcFechExtincion.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA EXTINCIÓN");
                contador++;
            }
            if(this.jcFechUltRevaluo.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA ÚLT. REVALUO");
                contador++;
            }
            if(this.jcFechUltCredito.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA ÚLT. CRÉDITO");
                contador++;
            }
            if(this.jcFechUltDebito.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA ÚLT. DÉBITO");
                contador++;
            }
            if(this.cmbSucursal.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE SUCURSAL");
                contador++;
            }
            if(this.cmbComuna.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE COMUNA");
                contador++;
            }
            if(this.cmbCobertura.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE COBERTURA");
                contador++;
            }
            if(this.cmbEstadoContri.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE ESTADO CONTRIB.");
                contador++;
            }
            if(this.cmbGradoPreferencia.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE GRADO PREFERENCÍA");
                contador++;
            }
            if(this.cmbLocaReg.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE LOCALIDAD REGISTRO");
                contador++;
            }
            if(this.cmbMoneda.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE MONEDA");
                contador++;
            }
            if(this.cmbTipoConstru.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE TIPO DE CONSTRUCCIÓN");
                contador++;
            }
            if(this.cmbTipoGtia.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE TIPO GARANTÍA");
                contador++;
            }
        return contador;
    }
}
